﻿namespace RESTController.Lib
{
    internal static class IntegerExtensions
    {
        public static int ToIndex(this int? i)
        {
            return (i == null || i < 1) ? 0 : i.Value - 1;
        }
    }
}
